Skip to content

Conversation

@sukvvon
Copy link
Contributor

@sukvvon sukvvon commented Dec 6, 2025

Related Bug Reports or Discussions

Fixes #

Summary

  • Apply ESLint test rules (vitest, testing-library, jest-dom) that were configured but not actually being applied
  • Add missing expect assertions to satisfy vitest/expect-expect rule
  • Add eslint-disable comments for valid exceptions

Notes

  • vitest/no-conditional-expect is disabled for [DEV-ONLY] tests in error.test.tsx because:

    • These tests behave differently based on React version (17 vs 18+) and build mode (dev vs prod)
    • Using it.runIf/it.skipIf to split tests causes failures in production builds
    • The conditional expect is a valid pattern for this complex testing scenario
  • vitest/expect-expect is disabled for types-only test in useHydrateAtoms.test.tsx because:

    • This test only validates TypeScript types at compile time, not runtime behavior

Check List

  • pnpm run fix for formatting and linting code and docs

@vercel
Copy link

vercel bot commented Dec 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
jotai Ready Ready Preview Comment Dec 10, 2025 3:05pm

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 6, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 6, 2025

More templates

npm i https://pkg.pr.new/jotai@3190

commit: afa2a07

@github-actions
Copy link

github-actions bot commented Dec 6, 2025

LiveCodes Preview in LiveCodes

Latest commit: afa2a07
Last updated: Dec 10, 2025 3:04pm (UTC)

Playground Link
React demo https://livecodes.io?x=id/BBNMJL42Q

See documentations for usage instructions.

@sukvvon sukvvon force-pushed the chore/apply-test-lint-rules branch from d7a01fd to 3bb856b Compare December 6, 2025 06:03
@sukvvon sukvvon force-pushed the chore/apply-test-lint-rules branch from 3bb856b to 0b1eb45 Compare December 6, 2025 06:12
@sukvvon sukvvon force-pushed the chore/apply-test-lint-rules branch from 0b1eb45 to f1a0557 Compare December 6, 2025 06:28
@sukvvon sukvvon force-pushed the chore/apply-test-lint-rules branch from f1a0557 to a02443a Compare December 6, 2025 06:46
@sukvvon sukvvon force-pushed the chore/apply-test-lint-rules branch from a02443a to 783bc4a Compare December 6, 2025 06:55
@sukvvon sukvvon force-pushed the chore/apply-test-lint-rules branch from 783bc4a to 21bf506 Compare December 6, 2025 07:01
@sukvvon sukvvon force-pushed the chore/apply-test-lint-rules branch from 21bf506 to 93eb4ef Compare December 6, 2025 07:26
@sukvvon sukvvon changed the title chore(eslint): apply test lint rules and replace 'ts-expect' with 'expectTypeOf' chore(eslint): apply test lint rules and replace 'ts-expect' with variable assignment Dec 6, 2025
@sukvvon sukvvon force-pushed the chore/apply-test-lint-rules branch from 93eb4ef to 0b3ca70 Compare December 6, 2025 07:32
@sukvvon sukvvon marked this pull request as ready for review December 7, 2025 02:37
@sukvvon sukvvon force-pushed the chore/apply-test-lint-rules branch from c147cfd to 60209a0 Compare December 7, 2025 02:44
@sukvvon sukvvon marked this pull request as draft December 7, 2025 02:46
@sukvvon sukvvon force-pushed the chore/apply-test-lint-rules branch from 60209a0 to 0b3ca70 Compare December 7, 2025 02:50
@sukvvon sukvvon marked this pull request as ready for review December 7, 2025 02:52
@dai-shi
Copy link
Member

dai-shi commented Dec 9, 2025

  • Apply ESLint test rules (vitest, testing-library, jest-dom) that were configured but not actually being applied

Could you create a dedicated PR for this in Jotai and Zustand?

And, have a ts-expect PR separately (can reuse this PR).

@dai-shi
Copy link
Member

dai-shi commented Dec 9, 2025

@sukvvon Still waiting for separating PRs in Jotai repo. Basically one is the same scope as pmndrs/zustand#3321.

@sukvvon sukvvon marked this pull request as ready for review December 10, 2025 15:04
@sukvvon sukvvon changed the title chore(eslint): apply test lint rules and replace 'ts-expect' with variable assignment chore(eslint): enable 'testing-library', 'jest-dom', 'vitest' plugins and fix violations Dec 10, 2025
Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks for the fix!

@dai-shi dai-shi merged commit 12fd9fc into pmndrs:main Dec 11, 2025
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants